package com.cheese.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class AllController {
    @Autowired
    JdbcTemplate jdbcTemplate;
    @ResponseBody
    @GetMapping("/hello2")
    public List<Map<String,Object>> map(){
        String fund_code = "000001a";
        String sql = "select * from " + fund_code;
        List<Map<String,Object>> list =  jdbcTemplate.queryForList(sql);


        return list;
    }
}
